VERSION 5.00
Begin VB.Form frmVAT 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Form1"
   ClientHeight    =   1830
   ClientLeft      =   45
   ClientTop       =   345
   ClientWidth     =   4440
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1830
   ScaleWidth      =   4440
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmdNoDate 
      Caption         =   "חשב ללא תאריך"
      Height          =   375
      Left            =   2520
      TabIndex        =   5
      Top             =   960
      Width           =   1695
   End
   Begin VB.CommandButton cmdVAT 
      Caption         =   "חשב"
      Height          =   375
      Left            =   120
      TabIndex        =   4
      Top             =   480
      Width           =   735
   End
   Begin VB.CommandButton cmdExit 
      Caption         =   "סגור"
      Height          =   315
      Left            =   120
      TabIndex        =   3
      Top             =   1440
      Width           =   855
   End
   Begin VB.TextBox txtDate 
      Height          =   375
      Left            =   960
      TabIndex        =   1
      Top             =   480
      Width           =   1455
   End
   Begin VB.Label Label2 
      Alignment       =   1  'Right Justify
      Caption         =   "אחוז המע""מ בתאריך:"
      Height          =   255
      Left            =   2400
      TabIndex        =   2
      Top             =   600
      Width           =   1815
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      Caption         =   "אחוז המע""מ"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   177
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   2040
      TabIndex        =   0
      Top             =   120
      Width           =   2295
   End
End
Attribute VB_Name = "frmVAT"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Const MOD_NAME = "frmVAT."
Option Explicit

Private Sub cmdExit_Click()
    Unload Me
End Sub

Private Sub cmdNoDate_Click()
Const FUNC_NAME = MOD_NAME & "cmdNoDate_Click"
10    On Error GoTo func_err
    Dim objCaspit As CaspitAPI.Caspit
    
20        Set objCaspit = New CaspitAPI.Caspit
30        With objCaspit
40            .CaspitPath = g_strCaspitPath
50            .AccessPath = g_strAccessPath
60            .BusinessID = g_iBusinessID
70            .DebugMode = g_blnDebug
80        End With

90        MsgBox objCaspit.GetVatRate()
100   Exit Sub
func_err:
110       MyErrMsgBox "Error " & Err.Number & " in " & Err.Source & ": " & Err.Description
End Sub

Private Sub cmdVAT_Click()
Const FUNC_NAME = MOD_NAME & "cmdVAT_Click"
10    On Error GoTo func_err
    Dim objCaspit As CaspitAPI.Caspit
    
20        Set objCaspit = New CaspitAPI.Caspit
30        With objCaspit
40            .CaspitPath = g_strCaspitPath
50            .AccessPath = g_strAccessPath
60            .BusinessID = g_iBusinessID
70            .DebugMode = g_blnDebug
80        End With

90        MsgBox objCaspit.GetVatRate(CDate(txtDate))
100   Exit Sub
func_err:
110       MyErrMsgBox "Error " & Err.Number & " in " & Err.Source & ": " & Err.Description
End Sub

Private Sub Form_Load()
Const FUNC_NAME = MOD_NAME & "Form_Load"
On Error GoTo func_err
    txtDate = Format(Date, "dd/mm/yyyy")
Exit Sub
func_err:
    MyErrMsgBox "Error " & Err.Number & " in " & Err.Source & ": " & Err.Description
End Sub
